export const phoneReg = /^1[3-9][0-9]{9}$/;
export const validataName = (value) => {
	if (!value) {
		return "请输入账号";
	}
	if (!phoneReg.test(value)) {
		console.log("22");
		return "账号不符合格式";
	}
	return;
};
export const passwordReg = /^[a-zA-Z0-9_]{6,18}$/;
export const validataPassword = (value) => {
	if (!value) {
		return "请输入密码";
	}
	if (!passwordReg.test(value)) {
		return "密码不符合格式";
	}
	return true;
};
export const numberReg = /^1[3-9][0-9]{9}$/;
export const validataNumber = (value) => {
	if (!value) {
		return "请输入手机号";
	}
	if (!numberReg.test(value)) {
		return "手机号不符合格式";
	}
	return true;
};
export const codeReg = /^[0-9]{4}$/;
export const validataCode = (value) => {
	if (!value) {
		return "请输入验证码";
	}
	if (!codeReg.test(value)) {
		return "验证码不符合格式";
	}
	return true;
};
